﻿Imports System.Collections.ObjectModel

''' <summary>
''' View Model de l'accordéon présent en bas à gauche de l'écran prinicpal (Etudes, inventaires, etc.)
''' </summary>
''' <remarks></remarks>
Public Class V2ViewModelAccordeonMenu
    Inherits ObservableCollection(Of V2ViewModelAccordeonMenuItem)


    Public Sub New()
        MyBase.New()
    End Sub

    Protected Sub New(ByVal children As IEnumerable(Of V2ViewModelAccordeonMenuItem))
        ' TODO: Complete member initialization 
        MyBase.New(children)
    End Sub


    Public Function GetByKey(ByVal key As String) As V2ViewModelAccordeonMenuItem
        Dim q = From e In Me
                Where String.Compare(e.Key, key)
                Select e

        Return q.FirstOrDefault()
    End Function

    Protected _Etudes As V2ViewModelAccordeonMenuItem
    Public ReadOnly Property Etudes As V2ViewModelAccordeonMenuItem
        Get
            Return _Etudes
        End Get
    End Property

    Protected _Inventaires As V2ViewModelAccordeonMenuItem
    Public ReadOnly Property Inventaires As V2ViewModelAccordeonMenuItem
        Get
            Return _Inventaires
        End Get
    End Property

    Protected _Indicateurs As V2ViewModelAccordeonMenuItem
    Public ReadOnly Property Indicateurs As V2ViewModelAccordeonMenuItem
        Get
            Return _Indicateurs
        End Get
    End Property

    Protected _Formation As V2ViewModelAccordeonMenuItem
    Public ReadOnly Property Formation As V2ViewModelAccordeonMenuItem
        Get
            Return _Formation
        End Get
    End Property

End Class


